home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib05.dsk
/
LIGHT SHOW VARIATION 3.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
522b
|
10 lines
10 TEXT : GR : HOME
20 FOR NL = 1 TO INT( RND(1) *20) +5: COLOR= INT( RND(1) *15) +1
30 X = INT( RND(1) *20):Y = X
40 DX = INT( RND(1) *3): IF DX = 2 THEN DX = -1
50 DY = INT( RND(1) *3): IF DY = 2 THEN DY = -1
60 FOR LL = 1 TO X +5
70 HLIN X,X AT Y: HLIN X,X AT 39 -Y: HLIN 39 -X,39 -X AT Y: HLIN 39 -X,39 -X AT 39 -Y
80 X = X +DX: IF ((X <0) OR (X >19)) THEN DX = DX * -1: GOTO 80
90 Y = Y +DY: IF ((Y <0) OR (Y >19)) THEN DY = DY * -1: GOTO 90
100 NEXT LL: NEXT NL: FOR P = 1 TO 6000: NEXT P: GOTO 10